from pyecharts import options as opts
from pyecharts.charts import Pie

def base_pie(x, y1, title):
    c = (
        Pie()
            .add(
            "",
            [list(z) for z in zip(x, y1)],

            center=["45%", "52%"],
        )
            .set_global_opts(
            title_opts=opts.TitleOpts(title=title),
            legend_opts=opts.LegendOpts(pos_left="15%",is_show = False),
        )
            .set_series_opts(label_opts=opts.LabelOpts(formatter="{b}: {c}"))
        )
    return c